/**
 * 
 */
package com.nervytech.tutorcruise.db.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * @author ADMIN
 *
 */
public enum CourseTypeEnum {
	
   REGISTERED(1),ATTENDED(2),SAVED_TEMPLATE(3),TAKEN(4),SCHEDULED(5),DRAFT(6);  
   
   int type;
   
   private static final Map<Integer, CourseTypeEnum> typesByValue = new HashMap<Integer, CourseTypeEnum>();

   static {
       for (CourseTypeEnum usrType : CourseTypeEnum.values()) {
           typesByValue.put(usrType.getType(), usrType);
       }
   }
   
   private CourseTypeEnum(int type) {
	 this.type = type;
   }
   
   public int getType() {
   	return type;
  }
   
   public static CourseTypeEnum forValue(int value) {
       return typesByValue.get(value);
   }
}
